//
//  YJSelectionIdentityViewController.m
//  AndCampus
//
//  Created by 史宵宵 on 2017/11/2.
//  Copyright © 2017年 史宵宵. All rights reserved.
//

#import "YJSelectionIdentityViewController.h"
#import "YJSystemCodeViewController.h"
#import "YJStudentTelCerViewController.h"

@interface YJSelectionIdentityViewController ()
@property (nonatomic,assign) KSystemRole role;
@property (nonatomic,assign) BOOL isSystemCode;
@end

@implementation YJSelectionIdentityViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    // Do any additional setup after loading the view from its nib.
 }
- (IBAction)back:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)setNextUp:(id)sender {
    if (self.isSystemCode ) {
        YJSystemCodeViewController *systemCodeVC = [[YJSystemCodeViewController alloc]init];
        systemCodeVC.role = self.role;
        [self.navigationController pushViewController:systemCodeVC animated:YES];
    }else{
        YJStudentTelCerViewController *studentTelCerVC = [[YJStudentTelCerViewController alloc]init];
        studentTelCerVC.telCerRole = KTelCerPerson;
        [self.navigationController pushViewController:studentTelCerVC animated:YES];
    }
}

- (IBAction)selectStudent:(id)sender {
    self.isSystemCode = YES;
    self.role = KSystemRoleStudent;
    
    self.teacherLabel.textColor = KTEXTMAINCOLOR;
    self.teacherLabel.text = @"老师";
    self.pesentLabel.textColor = KTEXTMAINCOLOR;
    self.pesentLabel.text = @"家长";
    
    self.studentLabel.font = [UIFont fontWithName:@"IconFont" size: 14.0];
    self.studentLabel.textColor = KBACKNAVIGATIONCOLOR;
    self.studentLabel.attributedText = [Global returnAttributedstringFromstring:@"\U0000e69e 学生" andlocation:2 andLength:2 andAttributeStringColor:KTEXTMAINCOLOR andFondSize:14];
}
- (IBAction)selectPersent:(id)sender {
   self.isSystemCode = YES;
   self.role = KSystemRoleTeacher;
    
    self.studentLabel.textColor = KTEXTMAINCOLOR;
    self.studentLabel.text = @"学生";
    self.pesentLabel.textColor = KTEXTMAINCOLOR;
    self.pesentLabel.text = @"家长";
    
   self.teacherLabel.font = [UIFont fontWithName:@"IconFont" size: 14.0];
   self.teacherLabel.textColor = KBACKNAVIGATIONCOLOR;
   self.teacherLabel.attributedText = [Global returnAttributedstringFromstring:@"\U0000e69e 老师" andlocation:2 andLength:2 andAttributeStringColor:KTEXTMAINCOLOR andFondSize:14];
    
}
- (IBAction)selectTeacher:(id)sender {
    self.isSystemCode = NO;
   
    self.studentLabel.textColor = KTEXTMAINCOLOR;
    self.studentLabel.text = @"学生";
    self.teacherLabel.textColor = KTEXTMAINCOLOR;
    self.teacherLabel.text = @"老师";
    
    self.pesentLabel.font = [UIFont fontWithName:@"IconFont" size: 14.0];
    self.pesentLabel.textColor = KBACKNAVIGATIONCOLOR;
    self.pesentLabel.attributedText = [Global returnAttributedstringFromstring:@"\U0000e69e 家长" andlocation:2 andLength:2 andAttributeStringColor:KTEXTMAINCOLOR andFondSize:14];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
